<template>
    <div id="app">
        <router-view :storeId="storeId" :tableNo="tableNo"></router-view>
    </div>
</template>

<script>

import autofit from "autofit.js";

export default {
    name: 'app',
    data(){
    	return {
    		storeId:'',
            tableNo:''
    	}
    },
    created(){
    	let searchStr = window.location.search.split('?')[1];
			let searchArr = searchStr.split('&');
			let searchObj = {};
			for (var i = 0; i < searchArr.length; i++) {
				var curParam = searchArr[i].split('=');
				searchObj[curParam[0]] = curParam[1];
			}
            this.storeId = searchObj.storeId;
			this.tableNo = searchObj.tableNo;
    },
    mounted() {
        autofit.init({
            dh: 1050,
            dw: 1700,
            el: "body",
            resize: true
        })
    },
}
</script>
<style lang="scss">
    #app {
        overflow: hidden;
        min-width: 1200px;
        height: 100%;
        font-family: '微软雅黑';
        font-size: 16px;
    }
    .el-message__icon{
        font-size: 16px;
    }
</style>
